package team7.made;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.util.AttributeSet;
import android.view.View;
import android.widget.RadioGroup;

class QuestionView extends View{
	
	String questionText;
	
	// Overridden Constructor
	public QuestionView(Context context){
		super(context);
	}
	
	public void setText(String string){
		questionText = string;
	}
	
	//Drawing method
	@Override
	protected void onDraw(Canvas canvas) {
        super.onDraw(canvas);
        
        // Initialize paint object
        Paint paint = new Paint();
        
        // Make background white
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(Color.BLACK);
        canvas.drawPaint(paint);
        
        // Write text
        paint.setAntiAlias(true);
        paint.setStyle(Paint.Style.FILL);
        paint.setStrokeWidth(2);
        paint.setColor(Color.WHITE);
        paint.setTextSize(16);
        canvas.drawText(questionText, 10, 20, paint); 
    }
}
